#pragma once
#include <tchar.h>
#include <StaticMesh.h>
#include <string>

namespace grflib
{
	namespace engine
	{
		namespace aux
		{
			namespace mesh_loader
			{
                //automatically generates and uses mipmap for images whose max(w, h) > autoMipmapThreshold
				HRESULT LoadObjFile(const TCHAR *filename, CStaticMesh &mesh, UINT autoMipmapThreshold = 512UL);
				HRESULT LoadMtlFile(const wchar_t *filename, UINT autoMipmapThreshold);
				HRESULT LoadMtlFile(const char *filename, UINT autoMipmapThreshold);

				void ObjTextureDescToStd(const std::string &objDesc, std::string &stdDesc);

			} //namespace mesh_loader
		} //namespace aux
	} //namespace engine
} //namespace grflib